<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="javascript:;">设备类别</a></li>
			<li><a href="{:U('Stypeadmin/add')}" target="_self">{:L('ADD')}</a></li>
		</ul>
		
		<form class="js-ajax-form" action="" method="post">			
			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>						
						<th width="50">{:L('TYPEID')}</th>
						<th width="50">{:L('TYPENAME')}</th>						
						<th width="70">{:L('ACTIONS')}</th>
					</tr>
				</thead>				
				<foreach name="type_lists" item="vo">
				<tr>					
					<td>{$vo.type_id}</td>					
					<td>{$vo.type_name}</td>					
					<td>
						<a href="{:U('Stypeadmin/edit',array('id'=>$vo['type_id']))}">{:L('EDIT')}</a> | 
						<a href="{:U('Stypeadmin/delete',array('id'=>$vo['type_id']))}" class="js-ajax-delete">{:L('DELETE')}</a></td>
				</tr>
				</foreach>				
			</table>			
			<div class="pagination" style="float:right">{$Page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>		
		
	<script>
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location = "{:U('Stypeadmin/index',$formget)}";
			}
		}
		setInterval(function() {
			refersh_window();
		}, 2000);
		$(function() {
			setCookie("refersh_time", 0);
			Wind.use('ajaxForm', 'artDialog', 'iframeTools', function() {
				//批量移动
				$('.js-articles-move').click(function(e) {
					var str = 0;
					var id = tag = '';
					$("input[name='ids[]']").each(function() {
						if ($(this).attr('checked')) {
							str = 1;
							id += tag + $(this).val();
							tag = ',';
						}
					});
					if (str == 0) {
						art.dialog.through({
							id : 'error',
							icon : 'error',
							content : '您没有勾选信息，无法进行操作！',
							cancelVal : '关闭',
							cancel : true
						});
						return false;
					}
					var $this = $(this);
					art.dialog.open("__ROOT__/index.php?g=portal&m=AdminPost&a=move&ids="+ id, {
						title : "批量移动",
						width : "80%"
					});
				});
			});
		});
	</script>
</body>
</html>